package poo.string;

public class C {

	private double[] a;
	private int size;

	public String toString() {
		// soluzione basata su StringBuilder
		StringBuilder sb = new StringBuilder(500);
		sb.append('[');
		for (int i = 0; i < size; i++) {
			sb.append(String.format("%1.2f", a[i]));
			if (i < size - 1)
				sb.append(", ");
		}
		sb.append(']');
		return sb.toString();

	}

}
